package cn.meye11.crm.domain.model;

import java.time.LocalDateTime;

import cn.meye11.crm.domain.entity.ItemEntity;
import lombok.*;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
/**
 * 项目表(Item)模型类
 *
 * @author makejava
 * @since 2023-11-18 19:20:43
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//@ApiModel("项目表")
public class Item implements Serializable {

    private static final long serialVersionUID = 226871902833017553L;
    
    public Item(ItemEntity entity) {
        BeanUtils.copyProperties(entity, this);
    }
    
    private Long id;
   //@ApiModelProperty(value = "项目名称")
    @NotEmpty(message = "项目名称 不能为空")
    private String name;
   //@ApiModelProperty(value = "项目代码")
    @NotEmpty(message = "项目代码 不能为空")
    private String code;
   //@ApiModelProperty(value = "含税价格")
    private Double price;
   //@ApiModelProperty(value = "未税价格")
    private Double untaxedPrice;
   //@ApiModelProperty(value = "税率")
    private Double taxRate;
   //@ApiModelProperty(value = "服务内容")
    private String serviceContent;
   //@ApiModelProperty(value = "标签")
    private String label;
   //@ApiModelProperty(value = "是否删除", hidden = true)
    private Integer del;
   //@ApiModelProperty(value = "最后修改时间", notes = "yyyy-MM-dd HH:mm:ss", example = "2020-01-01 00:00:00", hidden = true)
    private LocalDateTime last;
   //@ApiModelProperty(value = "创建时间", notes = "yyyy-MM-dd HH:mm:ss", example = "2020-01-01 00:00:00", hidden = true)
    private LocalDateTime time;
   //@ApiModelProperty(value = "创建人", hidden = true)
    private String createdBy;
   //@ApiModelProperty(value = "最后修改人", hidden = true)
    private String modifiedBy;
   //@ApiModelProperty(value = "版本")
    private Integer version;

}
